<%@ page language="java" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="m" uri="/cutm_tags"%>
<html>
<head>
<title>串联单查询打印</title>
<link rel="stylesheet"
	href="<s:url value="/common/css/datepicker.css"/>" type="text/css" />
<script type="text/javascript"
	src="<s:url value="/common/script/ui.datepicker.js"/>"></script>
<script type="text/javascript"
	src="<s:url value="/common/script/ui.datepicker-fr.js"/>"></script>
<script type="text/javascript">
$(document).ready(function() {

});
//查询
function search1(){
}
//提交
function commit(){
	if(BaseJs.confirm('确定要提交吗？')){
		$("#editForm").vaildAjax(function(data){
			alert('保存成功');
		});
	}
}
function searchDaoYu() {
	var programId = $('#programId').val();
	if(programId!=''){
		var url=BaseJs.action('programming/SearchProgram!searchDaoYu')+'?programming.id='+programId;
		window.open(url);
	}else{
		 alert('请选择编排的节目');
	}
}
function download() {
	var programId = $('#programId').val();
	if(programId!=''){
		var url=BaseJs.action('programming/DownloadProgram')+'?programming.id='+programId;
		window.open(url);
	}else{
		 alert('请选择编排的节目');
	}
}
function print() {
	var programId = $('#programId').val();
	if(programId!=''){
		var url=BaseJs.action('programming/SearchProgram!printProgram')+'?programming.id='+programId;
		window.open(url);
	}else{
		 alert('请选择编排的节目');
	}
}
</script>
</head>
<body>
<h2 class="title"><span>串联单查询打印</span></h2>
<s:form id="serchForm" action="programming/SearchProgram!searchProgram">
	<s:hidden name="programming.id" id="programId" />
	<h3>请输入查询条件</h3>
	<table id="sTable" class="form">
		<tbody>
			<tr>
				<th width="20%">*播出日期</th>
				<td width="30%"><m:date name="programming.date"
					cssClass="rule[required]" /></td>
				<th width="20%">*播出栏目</th>
				<td width="30%"><m:select enumType="program.type"
					name="programming.column" cssClass="rule[required]" /></td>
			</tr>
		</tbody>
	</table>
	<div class="btnGroup"><s:submit id="search" value="查询" /></div>
</s:form>
<s:if test="progm2GaoJians!=null">
	<h3>稿件列表</h3>
	<s:form id="editForm" action="programming/EditProgram!editProgram">
		<table width="100%" class="list">
			<tr>
				<th width="3%">序号</th>
				<th width="15%">标题</th>
				<th width="10%">记者</th>
				<th width="9%">撰稿日期</th>
				<th width="7%">配音人员</th>
				<th width="6%">配音长度</th>
				<th width="7%">口播</th>
				<th width="7%">导语</th>
				<th width="7%">编后语</th>
				<th width="14%">提要</th>
				<th width="10%">角标</th>
				<th width="5%">操作</th>
			</tr>

			<tbody>
				<s:iterator value="progm2GaoJians">
					<tr>
						<td><s:property value="order" /></td>
						<td><s:property value="manuscript.title" /></td>
						<td><s:property value="manuscript.reportorName" /></td>
						<td><s:date name="manuscript.createDate"
							format="yyyy-MM-dd HH:mm" /></td>
						<td><s:property value="manuscript.puser.name" /></td>
						<td><s:property value="manuscript.timeLong" /></td>
						<td><s:property value="kouBoName" /></td>
						<td><s:property value="daoYuName" /></td>
						<td><s:property value="bianHouYuName" /></td>
						<td><s:property value="tiYao" /></td>
						<td><s:property value="jiaoBiao" /></td>
						<td><m:imgA img="view" msg="查看信息"
							action="manuscript/EditManuscript!toEdit?manuscript.id=${manuscript.id}" /></td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
		<div class="btnGroup"><input value="查看导语" type="button"
			onclick="searchDaoYu();"><input value="导出串联单" type="button"
			onclick="download();"><input value="打印串联单" type="button"
			onclick="print();"></div>
	</s:form>
</s:if>
</body>
</html>